<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2023/12/31
 * Time: 6:47
 */
namespace app\modules\wx\controllers;

use app\common\controllers\WebController;
use app\common\helper\HistoryHelper;
use app\common\service\Wx;
use app\modules\setting\models\yh\SetYhCcsj;
use app\modules\setting\models\yh\SetYhJbxx;
use sookie\auth\models\Adminuser;
use Yii;
use yii\helpers\Json;

class IndexController extends WebController
{
    public $debug = false;//调试接口
//    public
    public function actionIndex(){
        header("Access-Control-Allow-Origin: *");
        header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
        header("Access-Control-Allow-Headers: Content-Type, X-Requested-With");
        if(Yii::$app->request->isPost){
            // 处理 POST 数据
            $postData = file_get_contents("php://input");
            // ... 对 $postData 进行处理 ...
            $postData = Json::decode($postData,true);
            var_dump($postData);
        }
    }
}